
import { computed, ref, reactive } from 'vue';
import { Pagination } from '@/types/global';
import type { TableColumnData, TableData } from '@arco-design/web-vue/es/table/interface';

const fmodel:any = {
  applicationId: 100,
  permissionCode: '',
  permissionName: '',
  permissionGroup: ''
};
export const formModel = ref(fmodel);
export const rowSelection = reactive({
  type: 'radio',
  showCheckedAll: false,
  checkStrictly: false // 是否一起选中children
});
export const pagination: Pagination = reactive({
  current: 1,
  pageSize: 2000,
});
export const columns = computed<TableColumnData[]>(() => [
  {
    title: '编号',
    dataIndex: 'permissionId',
  },
  {
    title: '权限代码',
    dataIndex: 'permissionCode',
  },
  {
    title: '权限名称',
    dataIndex: 'permissionName',
  },
  {
    title: '权限类型',
    dataIndex: 'permissionTypeName',
  },
  {
    title: '权限分组',
    dataIndex: 'permissionGroup',
  },
  // {
  //   title: '访问类型',
  //   dataIndex: 'accessTypeName',
  // },
  {
    title: '数据范围',
    dataIndex: 'scopeTypeName',
  },
  {
    title: '资源名称',
    dataIndex: 'resourceName',
  },
  {
    title: '创建时间',
    dataIndex: 'time',
  },
  {
    title: '创建人',
    dataIndex: 'creatorName',
  },
  {
    title: '是否可用',
    dataIndex: 'enabled',
    slotName: 'enable',
  },
  {
    title: '操作',
    slotName: 'operations',
    width: 110,
    align: 'center',
  },
]);
